package com.wuming.house.service;

import com.wuming.house.core.BusinessException;
import com.wuming.house.model.GroupHouse;
import com.wuming.house.model.House;

import java.util.List;

public interface GroupHouseService {

    /**
     * 保存分组房产信息
     *
     * @param gh 分组房产信息
     * @throws BusinessException
     */
    void saveGroupHouse(GroupHouse gh) throws BusinessException;

    /**
     * 根据groupid查询分组房产信息
     *
     * @param groupId 分组id
     * @return 分组房产信息
     * @throws BusinessException
     */
    List<GroupHouse> getHouseByGroupId(Integer groupId, int pageIndex, int pageSize) throws BusinessException;

    int getTotal(Integer groupId) throws BusinessException;

    GroupHouse getHouseGroupByGroupIdAndHouseId(Long groupId, Long houseId) throws BusinessException;

    List<GroupHouse> getAllGroupHousesByParams(Long groupId) throws BusinessException;

    List<GroupHouse> getGroupHousesByPage(Long groupId,int pageIndex,int pageSize) throws BusinessException;

    int getTotalForOnly(Long groupId) throws BusinessException;

    void deleteHouse(Long groupId,Long houseId);

    void deleteByHouseId(Long houseId);

    void modify(GroupHouse groupHouse);

    GroupHouse getByGroupIdAndHouseId(Long groupId,Long houseId);
}
